import java.rmi.Remote;
import java.rmi.RemoteException;


/**
 * This interface is provided between servers for synchronization
 * @author CYCE
 *
 */
public interface IServer extends Remote 
{	
	/**
	 * This allows one server to have another server execute a 
	 * request on its behalf. The secondary server will allow the
	 * primary server to do all the work if possible. 
	 */
	public void doRequest() throws RemoteException;
	
	/**
	 * This method notifies the other server that a change has occured
	 * and that it should update its state to reflect the changes
	 * 
	 */
	public void notifyChange(String updateInfo) throws RemoteException;
	
	/**
	 * This allows one server to ask for state information from another
	 */
	public String getMode() throws RemoteException;

	/*
	 * Servers use this function to ask each other if they are alive
	 */
	public boolean areYouAlive() throws RemoteException;

	public String getState() throws RemoteException;
}
